package com.maker997.ajax.dto;

import lombok.Data;

/**
 * 封装JSON数据
 *
 * @author maker
 * @date 2017/11/03
 */
@Data
public class JsonResult<T> {

    private boolean success;

    private T data;

    private String error;

    public JsonResult(boolean success, T data)
    {
        this.success = success;
        this.data = data;
    }

    public JsonResult(boolean success, String error)
    {
        this.success = success;
        this.error = error;
    }
}
